package fr.nts.application.novadmin.database.model.employe;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Represente un employé Novadmin avec ces infos essentiels
 * 
 * @author sco
 * @version 1.0.0
 */
@Entity
@Table(name = "novadmin_employee")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class NovadminEmployeSimple extends BaseNovadminEmploye{
    
    private static final long serialVersionUID = 1L;
    
    private static final Logger log = LoggerFactory.getLogger(NovadminEmployeSimple.class);

    
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString(){
    	if(getLog().isDebugEnabled()){
	    	return new ToStringBuilder(this).appendSuper(super.toString())
	                                        .toString();
    	}else{
    		return super.toString();
    	}
    }


    /*
     * (non-Javadoc)
     * @see fr.nts.framework.database.jpa.model.AJPAObject#getLog()
     */
    @Override
    protected Logger getLog(){
    	return log;
    }
}